#!/data/data/com.termux/files/usr/bin/bash

base_home=/data/data/com.termux/files/home/furnace
termux-notification -t '窑炉系统固障' -c $1'-点击后关闭报警，前去排除固障！' --action "bash -l -c 'mv ${base_home}/error.mp3 ${base_home}/ok.mp3;termux-torch off'"

if [ -e ${base_home}'/error.mp3' ]; then
  termux-torch off
  termux-volume music 15
  termux-torch on
  termux-media-player play ${base_home}/error.mp3
  termux-vibrate -d 3000 -f
  sleep 3
  termux-torch off
  sleep 5
fi
